package com.nbjtjc.safe.api.safe;

import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.model.safe.SafeEnterprise;
import com.nbjtjc.safe.service.safe.WordgenerateServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/safe/reportGenerate")
@CrossOrigin("*")
public class ReportGenterateController {

    @Autowired
    private WordgenerateServiceImpl wordgenerateService;


    @GetMapping("/generateReport")
    public Result generateReport(SafeEnterprise safeEnterprise) throws Exception {
        return wordgenerateService.generateMainWord(safeEnterprise);
    }
}
